﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Sisocana.Core.Models.UsuarioModel>>" %>
    <% if (Model.Count() > 0){ %>
    <table>
        <tr>
            <th>
                Add?
            </th>
            <th>
                User Name
            </th>
        </tr>
        <% foreach (var user in Model) { %>
        <tr>
            <td>  
                <input type="checkbox" name="selectedUsers" value="<%= user.nombreUsuario %>"
                <% if(user.check){ %>
                    <%= ViewData["IsGeneral"].Equals(true) ? "checked='checked'" : "checked='checked' disabled='disabled'" %> 
                <% } %>/>
            </td>
            <td>
                <%: Html.DisplayFor(modelItem => user.nombreUsuario) %>
            </td>
        </tr>
        <% } %>
    <% } else { %>
        <p> There are not available users to associate</p>
    <% } %>
</table>